CC = gcc
EDJE_CC = edje_cc
EDJE_CC_FLAGS = -v
GST_CFLAGS = `pkg-config --cflags gstreamer-0.10`
GST_LIBS = `pkg-config --libs gstreamer-0.10` -lgstinterfaces-0.10
EVAS_CFLAGS = `pkg-config --cflags ecore ecore-evas edje evas`
EVAS_LIBS = `pkg-config --libs ecore ecore-evas edje evas`

all: camera theme.edj

camera: main.o v4l2_smart.o
	$(CC) -g -Wall $(LIBS) $(GST_LIBS) $(EVAS_LIBS) -lpthread $^ -o $@

%.o: %.c
	$(CC) -g -Wall $(CFLAGS) $(GST_CFLAGS) $(EVAS_CFLAGS) -c $^ -o $@

%.edj: %.edc
	$(EDJE_CC) $(EDJE_CC_FLAGS) $^ $@

clean:
	rm -f *.o camera theme.edj

.PHONY: all clean
